#include "foodbutton.h"
#include <QAction>
FoodButton::FoodButton(QString name ,QString iconpath,QString money,QWidget *p):QToolButton(p)
{
    setIcon(QIcon("iconpath"));
    setIconSize(QSize(190,190));
    this->resize(200,200);

    frame = new QFrame;
    framelayout = new QVBoxLayout(frame);
    frame->resize(200,50);
    foodname = new QLabel(name);
    foodvlayout = new QVBoxLayout;
    space1 = new QSpacerItem(150,170);
    foodmoney = new QLabel(money);
    iconname = new QLabel;

    iconname->setPixmap(QPixmap(iconpath).scaled(90,90));

    foodname->setAlignment(Qt::AlignCenter);
    foodmoney->setAlignment(Qt::AlignCenter);

    framelayout->addWidget(iconname);
    framelayout->addWidget(foodname);
    framelayout->addWidget(foodmoney);


    foodvlayout->addWidget(frame);
    this->setLayout(foodvlayout);
}
